package com.daisuxia.back.utils;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.daisuxia.web.pojo.SysDict;

public class BackConstant {
	public static final String DEL_FLAG_ON = "0";// 删除标志 0：有效
	
	public final static String ON = "1";// 开关-开
	
	public final static String OFF = "0";// 开关-关
	
	
	public static final String CREDITLOANAPPLY_OVERDUE = "4";// 逾期
	
	public static final Map<String,String> groupNameMap = new LinkedHashMap<String,String>();

	public static final Map<String,String> groupNameTypeMap = new LinkedHashMap<String,String>();
	
	public static final Map<String,String> groupStatusMap = new HashMap<String,String>();//催收员状态

	public static final Map<String,String> typeMap = new LinkedHashMap<String,String>(); // 分期类型

	public static final Map<String,String> typeNameMap = new LinkedHashMap<String,String>(); // 分期名称
	
	public final static String XJX_JXL_STATUS_REFUSE = "0";// 贷速侠聚信立通讯录申请审核状态 拒绝
	
	public final static String XJX_JXL_STATUS_APPLY = "1";// 贷速侠聚信立通讯录申请审核状态 申请
	
	public final static String XJX_JXL_STATUS_AGREE = "2";// 贷速侠聚信立通讯录申请审核状态 同意
	
	
	
	public final static String XJX_OVERDUE_LEVEL_S1 = "3";// 贷速侠逾期等级或催收组S1
	
	public final static String XJX_OVERDUE_LEVEL_S2 = "4";// 贷速侠逾期等级或催收组S2
	
	public final static String XJX_OVERDUE_LEVEL_M1 = "5";// 贷速侠逾期等级或催收组M1
	
	public final static String XJX_OVERDUE_LEVEL_M2 = "6";// 贷速侠逾期等级或催收组M2
	
	public final static String XJX_OVERDUE_LEVEL_M3P = "7";// 贷速侠逾期等级或催收组M3+
	
	public final static String XJX_OVERDUE_LEVEL_S1_OR_S2 = "34";// 贷速侠逾期等级或催收组S1或S2，这个仅用于条件查询
	

	
	public final static Integer COLLECTION_ROLE_ID=10021;//催收员的角色ID
	
	public final static Integer OUTSOURCE_MANAGER_ROLE_ID=10022;//委外经理角色ID
	
	public final static Integer COLLECTION_MANAGE_ROLE_ID=10025;//催收主管角色ID
	
	public final static Integer MANAGER_ROLE_ID=10026;//经理角色ID
	
	public final static String XJX_COLLECTION_ORDER_STATE_SUCCESS = "4";// 贷速侠催收状态催收成功
	
	public final static String XJX_COLLECTION_ORDER_STATE_PAYING = "5";// 贷速侠催收状态续期（续期中不管之前怎样现在不能操作）
	
	public final static String XJX_COLLECTION_ORDER_STATE_ING = "1";// 贷速侠催收状态催收中
	
	public final static String XJX_COLLECTION_ORDER_STATE_PROMISE = "2";// 贷速侠催收状态承诺还款
	public final static String XJX_COLLECTION_ORDER_STATE_OUTSIDE = "3";// 贷速侠催收状态委外中
	
	public final static String XJX_COLLECTION_ORDER_STATE_WAIT = "0";// 贷速侠催收状态待催收
	
	
	public final static String XJX_COLLECTION_STATUS_MOVE_TYPE_IN = "1";// 贷速侠催收状态流转类型入催
	
	public final static String XJX_COLLECTION_STATUS_MOVE_TYPE_CONVERT = "2";// 贷速侠催收状态流转类型逾期等级转换
	
	public final static String XJX_COLLECTION_STATUS_MOVE_TYPE_OTHER = "3";// 贷速侠催收状态流转类型转单
	
	public final static String XJX_COLLECTION_STATUS_MOVE_TYPE_OUTSIDE = "4";// 贷速侠催收状态流转类型委外
	
	public final static String XJX_COLLECTION_STATUS_MOVE_TYPE_SUCCESS = "5";// 贷速侠催收状态流转类型催收完成
	
	
	
	
	static{
		groupNameMap.put(BackConstant.XJX_OVERDUE_LEVEL_S1,"S1");
		groupNameMap.put(BackConstant.XJX_OVERDUE_LEVEL_S2,"S2");
		groupNameMap.put(BackConstant.XJX_OVERDUE_LEVEL_M1,"M1");
		groupNameMap.put(BackConstant.XJX_OVERDUE_LEVEL_M2,"M2");
		groupNameMap.put(BackConstant.XJX_OVERDUE_LEVEL_M3P,"M3+");

		groupNameTypeMap.put("33","S1");
		groupNameTypeMap.put("43","S2");
		groupNameTypeMap.put("44","S3");
		groupNameTypeMap.put("55","M1");
		groupNameTypeMap.put("66","M2");
		groupNameTypeMap.put("77","M3+");
		
		groupStatusMap.put("0", "禁用");
		groupStatusMap.put("1", "启用");
		groupStatusMap.put("3", "删除");

		typeMap.put("2","二期还款");
		typeMap.put("3","三期还款");
		typeMap.put("4","四期还款");

		typeNameMap.put("1","一期");
		typeNameMap.put("2","二期");
		typeNameMap.put("3","三期");
		typeNameMap.put("4","四期");
	}
	
	public final static String XJX_COLLECTION_ORDER_USED = "1";// 派单状态-有效
	public final static String XJX_COLLECTION_ORDER_DELETED = "0";// 派单状态-无效
	
	/**
	 * 获取字典Map
	 * @return
	 */
	public static HashMap<String, String> orderState(List<SysDict> dictList){
		HashMap<String, String> dictMap=new HashMap<String, String>();
		for(SysDict dict:dictList){
			dictMap.put(dict.getValue(), dict.getLabel());
		}
		return dictMap;
	}
	
}
